<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<style type="text/css">
		*{
			margin:0px;
			padding:0px;
		}
		.top{
			width:100%; 
			height:35px; 
			line-height:35px; 
			font-size:12px;	
		}
		.top ul li{
			list-style:none;
			float:right;
			width:60px;
		}
		.main{
			font-size:25px; 
			font-weight:bold; 
			color:#FFF; 
			margin:200px 470px; 
			text-align:center;
			float:left;
		}
		.main a{
			color:#FFF; 
			text-decoration:none;
		}
		.main a:hover{
			text-decoration:none;
		}
		a{
			color:#06F;
			text-decoration:none;
		}
		a:hover{
			text-decoration:underline;
		}
		.error{
			font-size:12px; 
			color:red; 
			width:70%; 
			float:right; 
			margin-top:10px;
		}
		.error ul li{
			list-style: none;
		}
		.ui-mask{ 
			width: 100%;
			height: 100%;
			background: #000;
			position: absolute;
			top: 0px;
			height: 0px;
			z-index: 8000;
			opacity:0.4; 
			filter: Alpha(opacity=40);
		}
		.ui-dialog{ 
			height: 320px;
			display: none;
			z-index: 9000;
			top: 0px;
			left: 0px;
			background: #fff;	
			width: 460px;  
			border:1px solid #0C9;
			border-radius: 10px; 
			position: absolute;	
		}
		.ui-dialog-title{
			cursor: move;
			user-select:none;	
			width: 100%; 
			height: 80px; 
			background: #0C9; 
			line-height: 80px; 
			text-align: center; 
			border-top-left-radius:10px; 
			border-top-right-radius:10px; 
			color:#FFF; 
			font-size:26px; 
			font-weight:bold;
		}
		.ui-dialog-closebutton{
			width: 16px;
			height: 16px;
			display: block;
			position: absolute;
			top: 12px;
			right: 20px;
			background: url(images/close_def.png) no-repeat;
			cursor: pointer;
		}
		.ui-dialog-closebutton:hover{
			background:url(images/close_hov.png);
		}
	</style>
  </head>
  
  <body>
	<div style="height:35px;;width:100%;border-bottom:1px solid #CCC; z-index:-1; position:absolute; background:#EFEFEF;"></div>
	<div class="ui-mask" id="mask" onclick="javascript:hideDialog();" onselectstart="return false"></div>
	<div style="width:1200px; margin:auto;">
    	<!-- 顶部索引 -->
    	<div class="top">
        	<div style="width:50%; float:left;">你好！欢迎进入中国报险网。</div>
            <div style="width:50%; float:right; text-align:right;">
            	<jsp:include page="index_top.jsp"></jsp:include>  
            </div>
        </div>
        <!-- 登录信息 -->
        <div class="ui-dialog" id="dialogMove" onselectstart="return false;">
            <div class="ui-dialog-title" id="dialogDrag"  onselectstart="return false;">
            	欢迎登录
            	<a class="ui-dialog-closebutton" href="javascript:hideDialog();"></a>
            </div>
            <!-- 登录信息 -->
            <form action="${pageContext.request.contextPath }/customer/Customer_login.action" method="post">
                <div style="width: 100%; height: 42px; margin-top: 38px; line-height: 38px;">
                    <div style="width: 30%; float: left; text-align: right;">用户名：</div>
                    <div style="width: 70%; float: left; text-align: left;">
                        <input type="text" name="cname" placeholder="请输入用户名" value="<s:property value='%{cname}'/>" style="width: 250px; height: 32px; padding-left:5px;"/>
                    </div>
                </div>
                <div style="width: 100%; height: 42px; margin-top: 20px; line-height: 38px;">
                    <div style="width: 30%; float: left; text-align: right;">密码：</div>
                    <div style="width: 70%; float: left; text-align: left;">
                        <input type="password" name="cpwd" placeholder="请输入密码" style="width: 250px; height: 32px; padding-left:5px;"/>
                    </div>
                </div>
                <div style="width: 100%; height: 42px; margin-top:20px; line-height: 38px;">
                    <div style="width: 30%; float: left;">&nbsp;</div>
                    <div style="width: 70%; float: left; text-align: left;">
                        <input type="submit" value="登录" style="width: 250px; height: 38px; color:#FFF; font-size:22px; font-weight:bold; background:#0C9; border:none;"/>
                    </div>
                </div>
            </form>
        </div>       
        <!-- 主要信息 -->
        <div style="width:100%; height:580px; float:left;">
            <div class="main">         
                <a href="${pageContext.request.contextPath }/Page_addcasepage.action?cid=${Customer.cid }" id="add"><div style="background:#0C9; width:260px; height:56px; line-height:56px; border-radius:10px; cursor: pointer" id="add2">我要报险</div></a>
                <a href="${pageContext.request.contextPath }/cases/Case_modifycase.action" id="case"><div style="background:#0C9; margin-top:30px; width:260px; height:56px; line-height:56px; border-radius:10px; cursor: pointer" id="case2">查询报险</div></a>
            </div>
            <s:if test="#session.Customer == null">  
            	<div style="color:red; font-size:12px; float:left; margin:-130px 485px;">温馨提示：只有登录的用户才能进行操作~</div>
                <input type="hidden" id="loginstauts" value="0"/>
            </s:if>
            <s:else>
            	<input type="hidden" id="loginstauts" value="1"/>
            </s:else>
        </div>
        <!-- 版权 -->
        <div style="width:100%; height:30px; text-align:center; line-height:30px; float:left; font-size:14px;">Copyright© 中国报险网 2007-2015，All Rights Reserved</div>
    </div>
   	<s:if test="#session.Customer == null"> 
    	<script type="text/javascript">
    		window.onload = function(){
    		 	var add = document.getElementById("add");
    			var caselist = document.getElementById("case");
    			var add2 = document.getElementById("add2");
    			var caselist2 = document.getElementById("case2");

				//使我要报案，查询报案的链接无效
    			add.onclick = function(){
        			return false;
        		}

    			caselist.onclick = function(){
    				return false;
            	}

   			 	//设置我要报案，查询报案为灰色
    			add2.style.background = "#CCC";
    			caselist2.style.background = "#CCC";
            }
    	</script>		
	</s:if> 
    <script type="text/javascript" src="./js/index-login.js"></script>
  </body>
</html>
